\(\int \frac {(a+b x^3)^2}{c+d x^3} \, dx\) [11]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 19, antiderivative size = 173 \[ \int \frac {\left (a+b x^3\right )^2}{c+d x^3} \, dx=-\frac {b (b c-2 a d) x}{d^2}+\frac {b^2 x^4}{4 d}-\frac {(b c-a d)^2 \arctan \left (\frac {\sqrt [3]{c}-2 \sqrt [3]{d} x}{\sqrt {3} \sqrt [3]{c}}\right )}{\sqrt {3} c^{2/3} d^{7/3}}+\frac {(b c-a d)^2 \log \left (\sqrt [3]{c}+\sqrt [3]{d} x\right )}{3 c^{2/3} d^{7/3}}-\frac {(b c-a d)^2 \log \left (c^{2/3}-\sqrt [3]{c} \sqrt [3]{d} x+d^{2/3} x^2\right )}{6 c^{2/3} d^{7/3}} \]

[Out]

-b*(-2*a*d+b*c)*x/d^2+1/4*b^2*x^4/d+1/3*(-a*d+b*c)^2*ln(c^(1/3)+d^(1/3)*x)/c^(2/3)/d^(7/3)-1/6*(-a*d+b*c)^2*ln
(c^(2/3)-c^(1/3)*d^(1/3)*x+d^(2/3)*x^2)/c^(2/3)/d^(7/3)-1/3*(-a*d+b*c)^2*arctan(1/3*(c^(1/3)-2*d^(1/3)*x)/c^(1
/3)*3^(1/2))/c^(2/3)/d^(7/3)*3^(1/2)

Rubi [A] (verified)

Time = 0.09 (sec) , antiderivative size = 173, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.368, Rules used = {398, 206, 31, 648, 631, 210, 642} \[ \int \frac {\left (a+b x^3\right )^2}{c+d x^3} \, dx=-\frac {(b c-a d)^2 \arctan \left (\frac {\sqrt [3]{c}-2 \sqrt [3]{d} x}{\sqrt {3} \sqrt [3]{c}}\right )}{\sqrt {3} c^{2/3} d^{7/3}}-\frac {(b c-a d)^2 \log \left (c^{2/3}-\sqrt [3]{c} \sqrt [3]{d} x+d^{2/3} x^2\right )}{6 c^{2/3} d^{7/3}}+\frac {(b c-a d)^2 \log \left (\sqrt [3]{c}+\sqrt [3]{d} x\right )}{3 c^{2/3} d^{7/3}}-\frac {b x (b c-2 a d)}{d^2}+\frac {b^2 x^4}{4 d} \]

[In]

Int[(a + b*x^3)^2/(c + d*x^3),x]

[Out]

-((b*(b*c - 2*a*d)*x)/d^2) + (b^2*x^4)/(4*d) - ((b*c - a*d)^2*ArcTan[(c^(1/3) - 2*d^(1/3)*x)/(Sqrt[3]*c^(1/3))
])/(Sqrt[3]*c^(2/3)*d^(7/3)) + ((b*c - a*d)^2*Log[c^(1/3) + d^(1/3)*x])/(3*c^(2/3)*d^(7/3)) - ((b*c - a*d)^2*L
og[c^(2/3) - c^(1/3)*d^(1/3)*x + d^(2/3)*x^2])/(6*c^(2/3)*d^(7/3))

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 206

Int[((a_) + (b_.)*(x_)^3)^(-1), x_Symbol] :> Dist[1/(3*Rt[a, 3]^2), Int[1/(Rt[a, 3] + Rt[b, 3]*x), x], x] + Di
st[1/(3*Rt[a, 3]^2), Int[(2*Rt[a, 3] - Rt[b, 3]*x)/(Rt[a, 3]^2 - Rt[a, 3]*Rt[b, 3]*x + Rt[b, 3]^2*x^2), x], x]
 /; FreeQ[{a, b}, x]

Rule 210

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^(-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])
], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 398

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Int[PolynomialDivide[(a + b*x^n)
^p, (c + d*x^n)^(-q), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && IGtQ[n, 0] && IGtQ[p, 0] && ILt
Q[q, 0] && GeQ[p, -q]

Rule 631

Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = 1 - 4*Simplify[a*(c/b^2)]}, Dist[-2/b, Sub
st[Int[1/(q - x^2), x], x, 1 + 2*c*(x/b)], x] /; RationalQ[q] && (EqQ[q^2, 1] ||  !RationalQ[b^2 - 4*a*c])] /;
 FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 642

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[d*(Log[RemoveContent[a + b*x +
c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 648

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rubi steps \begin{align*} \text {integral}& = \int \left (-\frac {b (b c-2 a d)}{d^2}+\frac {b^2 x^3}{d}+\frac {b^2 c^2-2 a b c d+a^2 d^2}{d^2 \left (c+d x^3\right )}\right ) \, dx \\ & = -\frac {b (b c-2 a d) x}{d^2}+\frac {b^2 x^4}{4 d}+\frac {(b c-a d)^2 \int \frac {1}{c+d x^3} \, dx}{d^2} \\ & = -\frac {b (b c-2 a d) x}{d^2}+\frac {b^2 x^4}{4 d}+\frac {(b c-a d)^2 \int \frac {1}{\sqrt [3]{c}+\sqrt [3]{d} x} \, dx}{3 c^{2/3} d^2}+\frac {(b c-a d)^2 \int \frac {2 \sqrt [3]{c}-\sqrt [3]{d} x}{c^{2/3}-\sqrt [3]{c} \sqrt [3]{d} x+d^{2/3} x^2} \, dx}{3 c^{2/3} d^2} \\ & = -\frac {b (b c-2 a d) x}{d^2}+\frac {b^2 x^4}{4 d}+\frac {(b c-a d)^2 \log \left (\sqrt [3]{c}+\sqrt [3]{d} x\right )}{3 c^{2/3} d^{7/3}}-\frac {(b c-a d)^2 \int \frac {-\sqrt [3]{c} \sqrt [3]{d}+2 d^{2/3} x}{c^{2/3}-\sqrt [3]{c} \sqrt [3]{d} x+d^{2/3} x^2} \, dx}{6 c^{2/3} d^{7/3}}+\frac {(b c-a d)^2 \int \frac {1}{c^{2/3}-\sqrt [3]{c} \sqrt [3]{d} x+d^{2/3} x^2} \, dx}{2 \sqrt [3]{c} d^2} \\ & = -\frac {b (b c-2 a d) x}{d^2}+\frac {b^2 x^4}{4 d}+\frac {(b c-a d)^2 \log \left (\sqrt [3]{c}+\sqrt [3]{d} x\right )}{3 c^{2/3} d^{7/3}}-\frac {(b c-a d)^2 \log \left (c^{2/3}-\sqrt [3]{c} \sqrt [3]{d} x+d^{2/3} x^2\right )}{6 c^{2/3} d^{7/3}}+\frac {(b c-a d)^2 \text {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,1-\frac {2 \sqrt [3]{d} x}{\sqrt [3]{c}}\right )}{c^{2/3} d^{7/3}} \\ & = -\frac {b (b c-2 a d) x}{d^2}+\frac {b^2 x^4}{4 d}-\frac {(b c-a d)^2 \tan ^{-1}\left (\frac {\sqrt [3]{c}-2 \sqrt [3]{d} x}{\sqrt {3} \sqrt [3]{c}}\right )}{\sqrt {3} c^{2/3} d^{7/3}}+\frac {(b c-a d)^2 \log \left (\sqrt [3]{c}+\sqrt [3]{d} x\right )}{3 c^{2/3} d^{7/3}}-\frac {(b c-a d)^2 \log \left (c^{2/3}-\sqrt [3]{c} \sqrt [3]{d} x+d^{2/3} x^2\right )}{6 c^{2/3} d^{7/3}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.10 (sec) , antiderivative size = 167, normalized size of antiderivative = 0.97 \[ \int \frac {\left (a+b x^3\right )^2}{c+d x^3} \, dx=\frac {-12 b c^{2/3} \sqrt [3]{d} (b c-2 a d) x+3 b^2 c^{2/3} d^{4/3} x^4+4 \sqrt {3} (b c-a d)^2 \arctan \left (\frac {-\sqrt [3]{c}+2 \sqrt [3]{d} x}{\sqrt {3} \sqrt [3]{c}}\right )+4 (b c-a d)^2 \log \left (\sqrt [3]{c}+\sqrt [3]{d} x\right )-2 (b c-a d)^2 \log \left (c^{2/3}-\sqrt [3]{c} \sqrt [3]{d} x+d^{2/3} x^2\right )}{12 c^{2/3} d^{7/3}} \]

[In]

Integrate[(a + b*x^3)^2/(c + d*x^3),x]

[Out]

(-12*b*c^(2/3)*d^(1/3)*(b*c - 2*a*d)*x + 3*b^2*c^(2/3)*d^(4/3)*x^4 + 4*Sqrt[3]*(b*c - a*d)^2*ArcTan[(-c^(1/3)
+ 2*d^(1/3)*x)/(Sqrt[3]*c^(1/3))] + 4*(b*c - a*d)^2*Log[c^(1/3) + d^(1/3)*x] - 2*(b*c - a*d)^2*Log[c^(2/3) - c
^(1/3)*d^(1/3)*x + d^(2/3)*x^2])/(12*c^(2/3)*d^(7/3))

Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 3.90 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.45

method result size
risch \(\frac {b^{2} x^{4}}{4 d}+\frac {2 b a x}{d}-\frac {b^{2} c x}{d^{2}}+\frac {\munderset {\textit {\_R} =\operatorname {RootOf}\left (d \,\textit {\_Z}^{3}+c \right )}{\sum }\frac {\left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) \ln \left (x -\textit {\_R} \right )}{\textit {\_R}^{2}}}{3 d^{3}}\) \(78\)
default \(\frac {b \left (\frac {1}{4} b d \,x^{4}+2 a d x -b c x \right )}{d^{2}}+\frac {\left (\frac {\ln \left (x +\left (\frac {c}{d}\right )^{\frac {1}{3}}\right )}{3 d \left (\frac {c}{d}\right )^{\frac {2}{3}}}-\frac {\ln \left (x^{2}-\left (\frac {c}{d}\right )^{\frac {1}{3}} x +\left (\frac {c}{d}\right )^{\frac {2}{3}}\right )}{6 d \left (\frac {c}{d}\right )^{\frac {2}{3}}}+\frac {\sqrt {3}\, \arctan \left (\frac {\sqrt {3}\, \left (\frac {2 x}{\left (\frac {c}{d}\right )^{\frac {1}{3}}}-1\right )}{3}\right )}{3 d \left (\frac {c}{d}\right )^{\frac {2}{3}}}\right ) \left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right )}{d^{2}}\) \(140\)

[In]

int((b*x^3+a)^2/(d*x^3+c),x,method=_RETURNVERBOSE)

[Out]

1/4*b^2*x^4/d+2*b/d*a*x-b^2/d^2*c*x+1/3/d^3*sum((a^2*d^2-2*a*b*c*d+b^2*c^2)/_R^2*ln(x-_R),_R=RootOf(_Z^3*d+c))

Fricas [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 505, normalized size of antiderivative = 2.92 \[ \int \frac {\left (a+b x^3\right )^2}{c+d x^3} \, dx=\left [\frac {3 \, b^{2} c^{2} d^{2} x^{4} + 6 \, \sqrt {\frac {1}{3}} {\left (b^{2} c^{3} d - 2 \, a b c^{2} d^{2} + a^{2} c d^{3}\right )} \sqrt {-\frac {\left (c^{2} d\right )^{\frac {1}{3}}}{d}} \log \left (\frac {2 \, c d x^{3} - 3 \, \left (c^{2} d\right )^{\frac {1}{3}} c x - c^{2} + 3 \, \sqrt {\frac {1}{3}} {\left (2 \, c d x^{2} + \left (c^{2} d\right )^{\frac {2}{3}} x - \left (c^{2} d\right )^{\frac {1}{3}} c\right )} \sqrt {-\frac {\left (c^{2} d\right )^{\frac {1}{3}}}{d}}}{d x^{3} + c}\right ) - 2 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \left (c^{2} d\right )^{\frac {2}{3}} \log \left (c d x^{2} - \left (c^{2} d\right )^{\frac {2}{3}} x + \left (c^{2} d\right )^{\frac {1}{3}} c\right ) + 4 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \left (c^{2} d\right )^{\frac {2}{3}} \log \left (c d x + \left (c^{2} d\right )^{\frac {2}{3}}\right ) - 12 \, {\left (b^{2} c^{3} d - 2 \, a b c^{2} d^{2}\right )} x}{12 \, c^{2} d^{3}}, \frac {3 \, b^{2} c^{2} d^{2} x^{4} + 12 \, \sqrt {\frac {1}{3}} {\left (b^{2} c^{3} d - 2 \, a b c^{2} d^{2} + a^{2} c d^{3}\right )} \sqrt {\frac {\left (c^{2} d\right )^{\frac {1}{3}}}{d}} \arctan \left (\frac {\sqrt {\frac {1}{3}} {\left (2 \, \left (c^{2} d\right )^{\frac {2}{3}} x - \left (c^{2} d\right )^{\frac {1}{3}} c\right )} \sqrt {\frac {\left (c^{2} d\right )^{\frac {1}{3}}}{d}}}{c^{2}}\right ) - 2 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \left (c^{2} d\right )^{\frac {2}{3}} \log \left (c d x^{2} - \left (c^{2} d\right )^{\frac {2}{3}} x + \left (c^{2} d\right )^{\frac {1}{3}} c\right ) + 4 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \left (c^{2} d\right )^{\frac {2}{3}} \log \left (c d x + \left (c^{2} d\right )^{\frac {2}{3}}\right ) - 12 \, {\left (b^{2} c^{3} d - 2 \, a b c^{2} d^{2}\right )} x}{12 \, c^{2} d^{3}}\right ] \]

[In]

integrate((b*x^3+a)^2/(d*x^3+c),x, algorithm="fricas")

[Out]

[1/12*(3*b^2*c^2*d^2*x^4 + 6*sqrt(1/3)*(b^2*c^3*d - 2*a*b*c^2*d^2 + a^2*c*d^3)*sqrt(-(c^2*d)^(1/3)/d)*log((2*c
*d*x^3 - 3*(c^2*d)^(1/3)*c*x - c^2 + 3*sqrt(1/3)*(2*c*d*x^2 + (c^2*d)^(2/3)*x - (c^2*d)^(1/3)*c)*sqrt(-(c^2*d)
^(1/3)/d))/(d*x^3 + c)) - 2*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*(c^2*d)^(2/3)*log(c*d*x^2 - (c^2*d)^(2/3)*x + (c^2
*d)^(1/3)*c) + 4*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*(c^2*d)^(2/3)*log(c*d*x + (c^2*d)^(2/3)) - 12*(b^2*c^3*d - 2*
a*b*c^2*d^2)*x)/(c^2*d^3), 1/12*(3*b^2*c^2*d^2*x^4 + 12*sqrt(1/3)*(b^2*c^3*d - 2*a*b*c^2*d^2 + a^2*c*d^3)*sqrt
((c^2*d)^(1/3)/d)*arctan(sqrt(1/3)*(2*(c^2*d)^(2/3)*x - (c^2*d)^(1/3)*c)*sqrt((c^2*d)^(1/3)/d)/c^2) - 2*(b^2*c
^2 - 2*a*b*c*d + a^2*d^2)*(c^2*d)^(2/3)*log(c*d*x^2 - (c^2*d)^(2/3)*x + (c^2*d)^(1/3)*c) + 4*(b^2*c^2 - 2*a*b*
c*d + a^2*d^2)*(c^2*d)^(2/3)*log(c*d*x + (c^2*d)^(2/3)) - 12*(b^2*c^3*d - 2*a*b*c^2*d^2)*x)/(c^2*d^3)]

Sympy [A] (verification not implemented)

Time = 0.34 (sec) , antiderivative size = 156, normalized size of antiderivative = 0.90 \[ \int \frac {\left (a+b x^3\right )^2}{c+d x^3} \, dx=\frac {b^{2} x^{4}}{4 d} + x \left (\frac {2 a b}{d} - \frac {b^{2} c}{d^{2}}\right ) + \operatorname {RootSum} {\left (27 t^{3} c^{2} d^{7} - a^{6} d^{6} + 6 a^{5} b c d^{5} - 15 a^{4} b^{2} c^{2} d^{4} + 20 a^{3} b^{3} c^{3} d^{3} - 15 a^{2} b^{4} c^{4} d^{2} + 6 a b^{5} c^{5} d - b^{6} c^{6}, \left ( t \mapsto t \log {\left (\frac {3 t c d^{2}}{a^{2} d^{2} - 2 a b c d + b^{2} c^{2}} + x \right )} \right )\right )} \]

[In]

integrate((b*x**3+a)**2/(d*x**3+c),x)

[Out]

b**2*x**4/(4*d) + x*(2*a*b/d - b**2*c/d**2) + RootSum(27*_t**3*c**2*d**7 - a**6*d**6 + 6*a**5*b*c*d**5 - 15*a*
*4*b**2*c**2*d**4 + 20*a**3*b**3*c**3*d**3 - 15*a**2*b**4*c**4*d**2 + 6*a*b**5*c**5*d - b**6*c**6, Lambda(_t,
_t*log(3*_t*c*d**2/(a**2*d**2 - 2*a*b*c*d + b**2*c**2) + x)))

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 189, normalized size of antiderivative = 1.09 \[ \int \frac {\left (a+b x^3\right )^2}{c+d x^3} \, dx=\frac {b^{2} d x^{4} - 4 \, {\left (b^{2} c - 2 \, a b d\right )} x}{4 \, d^{2}} + \frac {\sqrt {3} {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \arctan \left (\frac {\sqrt {3} {\left (2 \, x - \left (\frac {c}{d}\right )^{\frac {1}{3}}\right )}}{3 \, \left (\frac {c}{d}\right )^{\frac {1}{3}}}\right )}{3 \, d^{3} \left (\frac {c}{d}\right )^{\frac {2}{3}}} - \frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left (x^{2} - x \left (\frac {c}{d}\right )^{\frac {1}{3}} + \left (\frac {c}{d}\right )^{\frac {2}{3}}\right )}{6 \, d^{3} \left (\frac {c}{d}\right )^{\frac {2}{3}}} + \frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left (x + \left (\frac {c}{d}\right )^{\frac {1}{3}}\right )}{3 \, d^{3} \left (\frac {c}{d}\right )^{\frac {2}{3}}} \]

[In]

integrate((b*x^3+a)^2/(d*x^3+c),x, algorithm="maxima")

[Out]

1/4*(b^2*d*x^4 - 4*(b^2*c - 2*a*b*d)*x)/d^2 + 1/3*sqrt(3)*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*arctan(1/3*sqrt(3)*(
2*x - (c/d)^(1/3))/(c/d)^(1/3))/(d^3*(c/d)^(2/3)) - 1/6*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*log(x^2 - x*(c/d)^(1/3
) + (c/d)^(2/3))/(d^3*(c/d)^(2/3)) + 1/3*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*log(x + (c/d)^(1/3))/(d^3*(c/d)^(2/3)
)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 211, normalized size of antiderivative = 1.22 \[ \int \frac {\left (a+b x^3\right )^2}{c+d x^3} \, dx=-\frac {\sqrt {3} {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \arctan \left (\frac {\sqrt {3} {\left (2 \, x + \left (-\frac {c}{d}\right )^{\frac {1}{3}}\right )}}{3 \, \left (-\frac {c}{d}\right )^{\frac {1}{3}}}\right )}{3 \, \left (-c d^{2}\right )^{\frac {2}{3}} d} - \frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \log \left (x^{2} + x \left (-\frac {c}{d}\right )^{\frac {1}{3}} + \left (-\frac {c}{d}\right )^{\frac {2}{3}}\right )}{6 \, \left (-c d^{2}\right )^{\frac {2}{3}} d} - \frac {{\left (b^{2} c^{2} d^{2} - 2 \, a b c d^{3} + a^{2} d^{4}\right )} \left (-\frac {c}{d}\right )^{\frac {1}{3}} \log \left ({\left | x - \left (-\frac {c}{d}\right )^{\frac {1}{3}} \right |}\right )}{3 \, c d^{4}} + \frac {b^{2} d^{3} x^{4} - 4 \, b^{2} c d^{2} x + 8 \, a b d^{3} x}{4 \, d^{4}} \]

[In]

integrate((b*x^3+a)^2/(d*x^3+c),x, algorithm="giac")

[Out]

-1/3*sqrt(3)*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*arctan(1/3*sqrt(3)*(2*x + (-c/d)^(1/3))/(-c/d)^(1/3))/((-c*d^2)^(
2/3)*d) - 1/6*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*log(x^2 + x*(-c/d)^(1/3) + (-c/d)^(2/3))/((-c*d^2)^(2/3)*d) - 1/
3*(b^2*c^2*d^2 - 2*a*b*c*d^3 + a^2*d^4)*(-c/d)^(1/3)*log(abs(x - (-c/d)^(1/3)))/(c*d^4) + 1/4*(b^2*d^3*x^4 - 4
*b^2*c*d^2*x + 8*a*b*d^3*x)/d^4

Mupad [B] (verification not implemented)

Time = 5.55 (sec) , antiderivative size = 152, normalized size of antiderivative = 0.88 \[ \int \frac {\left (a+b x^3\right )^2}{c+d x^3} \, dx=\frac {b^2\,x^4}{4\,d}-x\,\left (\frac {b^2\,c}{d^2}-\frac {2\,a\,b}{d}\right )+\frac {\ln \left (d^{1/3}\,x+c^{1/3}\right )\,{\left (a\,d-b\,c\right )}^2}{3\,c^{2/3}\,d^{7/3}}+\frac {\ln \left (2\,d^{1/3}\,x-c^{1/3}+\sqrt {3}\,c^{1/3}\,1{}\mathrm {i}\right )\,\left (-\frac {1}{6}+\frac {\sqrt {3}\,1{}\mathrm {i}}{6}\right )\,{\left (a\,d-b\,c\right )}^2}{c^{2/3}\,d^{7/3}}-\frac {\ln \left (c^{1/3}-2\,d^{1/3}\,x+\sqrt {3}\,c^{1/3}\,1{}\mathrm {i}\right )\,\left (\frac {1}{2}+\frac {\sqrt {3}\,1{}\mathrm {i}}{2}\right )\,{\left (a\,d-b\,c\right )}^2}{3\,c^{2/3}\,d^{7/3}} \]

[In]

int((a + b*x^3)^2/(c + d*x^3),x)

[Out]

(b^2*x^4)/(4*d) - x*((b^2*c)/d^2 - (2*a*b)/d) + (log(d^(1/3)*x + c^(1/3))*(a*d - b*c)^2)/(3*c^(2/3)*d^(7/3)) +
 (log(3^(1/2)*c^(1/3)*1i + 2*d^(1/3)*x - c^(1/3))*((3^(1/2)*1i)/6 - 1/6)*(a*d - b*c)^2)/(c^(2/3)*d^(7/3)) - (l
og(3^(1/2)*c^(1/3)*1i - 2*d^(1/3)*x + c^(1/3))*((3^(1/2)*1i)/2 + 1/2)*(a*d - b*c)^2)/(3*c^(2/3)*d^(7/3))